/*
 * StrongT - Sistema Web
 * Copyright 2011-2012
 * 
 * Autor               : Enrique Morocco Tupa
 * Fecha Registro      : 25/11/2012 11:58:43 AM
 * Detalle             : UtilNumber
 */

package com.strategy.modulo.web.util;

/**
 *
 * @author Enrique Morocco Tupa
 */
public class UtilAppNumber {

    public static Double convertStringToDouble(String tValor) {

        Double valor = null;
        if (tValor != null && tValor.trim().length() > 0) {
            try {
                valor = Double.parseDouble(tValor);
            }
            catch (NumberFormatException nfe) {
                valor = null;
            }
        } else if (tValor == null || tValor.trim().length() == 0) {
            valor = 0.00;
        }

        return valor;
    }
}
